// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.characters.AttachedItems;

import java.util.ArrayList;

public final class AttachedModelName {
    public String attachmentNameSelf;
    public String attachmentNameParent;
    public String modelName;
    public float bloodLevel;
    public ArrayList<AttachedModelName> children;

    public AttachedModelName(AttachedModelName other) {
        this.attachmentNameSelf = other.attachmentNameSelf;
        this.attachmentNameParent = other.attachmentNameParent;
        this.modelName = other.modelName;
        this.bloodLevel = other.bloodLevel;

        for (int _int = 0; _int < other.getChildCount(); _int++) {
            AttachedModelName attachedModelName = other.getChildByIndex(_int);
            this.addChild(new AttachedModelName(attachedModelName));
        }
    }

    public AttachedModelName(String attachmentName, String _modelName, float _bloodLevel) {
        this.attachmentNameSelf = attachmentName;
        this.attachmentNameParent = attachmentName;
        this.modelName = _modelName;
        this.bloodLevel = _bloodLevel;
    }

    public AttachedModelName(String _attachmentNameSelf, String _attachmentNameParent, String _modelName, float _bloodLevel) {
        this.attachmentNameSelf = _attachmentNameSelf;
        this.attachmentNameParent = _attachmentNameParent;
        this.modelName = _modelName;
        this.bloodLevel = _bloodLevel;
    }

    public void addChild(AttachedModelName child) {
        if (this.children == null) {
            this.children = new ArrayList();
        }

        this.children.add(child);
    }

    public int getChildCount() {
        return this.children == null ? 0 : this.children.size();
    }

    public AttachedModelName getChildByIndex(int index) {
        return (AttachedModelName)this.children.get(index);
    }
}
